package com.wan.net.rpc.invoker.balancer;

import com.sun.istack.internal.NotNull;
import com.wan.net.rpc.service.RpcService;

import java.util.List;

/**
 * 均衡选择器
 * @author wwh
 * @date 2022/6/22 16:05
 */
public interface Balancer<T> {
    Balancer<RpcService> First = new FirstBalancer();
    Balancer<RpcService> Random = new RandomBalancer();

    T choose(@NotNull List<T> list);

}
